home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 5 / Amiga Tools 5.iso / tools / developer-tools / aros / source / exec / messages / src / deletemsgport.c < prev    next >
Encoding:
C/C++ Source or Header  |  1996-07-16  |  1.3 KB  |  65 lines

  1. /*
  2.     $Id$
  3.     $Log$
  4.     Desc:
  5.     Lang: english
  6. */
  7. #include "exec_intern.h"
  8. #include <exec/ports.h>
  9. #include <exec/execbase.h>
  10. #include <aros/libcall.h>
  11.  
  12. /*****************************************************************************
  13.  
  14.     NAME */
  15.     #include <clib/exec_protos.h>
  16.  
  17.     __AROS_LH1(void, DeleteMsgPort,
  18.  
  19. /*  SYNOPSIS */
  20.     __AROS_LA(struct MsgPort *, port, A0),
  21.  
  22. /*  LOCATION */
  23.     struct ExecBase *, SysBase, 112, Exec)
  24.  
  25. /*  FUNCTION
  26.     Delete a messageport allocated with CreateMsgPort(). The signal bit
  27.     is freed and the memory is given back to the memory pool. Remaining
  28.     messages are not replied. It is safe to call this function with a
  29.     NULL pointer.
  30.  
  31.     INPUTS
  32.     port - Pointer to messageport structure.
  33.  
  34.     RESULT
  35.  
  36.     NOTES
  37.  
  38.     EXAMPLE
  39.  
  40.     BUGS
  41.  
  42.     SEE ALSO
  43.  
  44.     INTERNALS
  45.  
  46.     HISTORY
  47.     29-10-95    digulla automatically created from
  48.                 exec_lib.fd and clib/exec_protos.h
  49.     17-12-95    digulla Incorporated code by Matthias Fleischner
  50.  
  51. *****************************************************************************/
  52. {
  53.     __AROS_FUNC_INIT
  54.     /* Only if there is something to free */
  55.     if(port!=NULL)
  56.     {
  57.     /* Free signal bit */
  58.     FreeSignal(port->mp_SigBit);
  59.  
  60.     /* And memory */
  61.     FreeMem(port,sizeof(struct MsgPort));
  62.     }
  63.     __AROS_FUNC_EXIT
  64. } /* DeleteMsgPort */
  65.